home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 176-200 / scopedisk180 / addtools / addtools.doc < prev    next >
Text File  |  1995-03-19  |  2KB  |  57 lines

  1.  
  2.  
  3.  
  4.              AddTools V1.1, by Steve Tibbett
  5.  
  6.  
  7. AddTools is a utility for Workbench 2.0, and is completely useless
  8. under 1.3.
  9.  
  10. It adds items to the "Tools" menu, and when these items are selected,
  11. it runs the program that you have attached to it.  This is great for
  12. such things as starting up a terminal, a Shell window, or whatever
  13. other items you want to put here.
  14.  
  15. It also has the capability to pass arguments to the commands - not the
  16. standard "Workbench" arguments, but rather it gives the spawned program
  17. a CLI-style environment, passing arguments on the command line in one
  18. of two manners.
  19.  
  20. To use, put the following line in your s:startup-sequence, at some point
  21. AFTER Workbench has been loaded and initialized, and after the Path has
  22. been set.  Putting AddTools into the WBStartup drawer will work, but 
  23. any program called by AddTools will not have a Path.  The line:
  24.  
  25.     RUN >NIL: <NIL: ADDTOOLS
  26.  
  27. will start up AddTools, sending the [CLI 2] (or whatever) to NIL: so it
  28. doesn't pop open a shell window should one not already be open.
  29.  
  30. ADDTOOLS looks for a file in S: called "ToolsList", in this format:
  31.  
  32.     Menu Item Title
  33.     Command To Execute When Selected
  34.     Directory name for command to be called from
  35.  
  36. Any line starting with "-" or ";" will be ignored.  The "ToolsList" supplied
  37. with AddTools is an example of a proper ToolsList, and it's format is
  38. documented there.
  39.  
  40. To get AddTools to quit, you have to send it an "F" break - you can
  41. do this by typing STATUS to see which process AddTools is, and then
  42. typing BREAK [Process Number] F and AddTools should remove it's menu
  43. items and quit.
  44.  
  45. The source is included, and compiles on my system just fine.  It assumes
  46. that you have the 2.0 includes, which are available with the SAS/C 5.10
  47. compiler package, or directly from Commodore.
  48.  
  49. The source provides a "Proper" way to spawn a command, giving it an output
  50. window should the command print anything, and taking input, properly.  The
  51. RunCommandFromWBArgs() routine may be of use to anybody writing similar
  52. programs.
  53.  
  54. This program is Public Domain, supplied as is.  If you have any questions,
  55. you can get ahold of me on People/Link as STEVEX, Bix as s.tibbett,
  56. or on my BBS at 613-731-3419.
  57.